﻿<UserControl 
    x:Class="MTGenome.Views.HomeView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:caliburn="http://www.caliburnproject.org"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    mc:Ignorable="d" 
    d:DesignHeight="450" d:DesignWidth="450">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Menu>
            <MenuItem Header="_File">
                <MenuItem Header="E_xit" caliburn:Message.Attach="TryClose" caliburn:Action.TargetWithoutContext="{Binding MainWindow}">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource DeleteIcon}" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <MenuItem Header="_Options">
                <MenuItem Header="_Offline Mode?" IsCheckable="True" IsChecked="{Binding Mode=TwoWay, Path=MainWindow.Offline}" />
            </MenuItem>
            <MenuItem Header="_Help">
                <MenuItem Header="_About" caliburn:Message.Attach="ShowAbout" caliburn:Action.TargetWithoutContext="{Binding MainWindow}">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource AboutIcon}" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
        </Menu>

        <Border Grid.Row="1" Background="Gray" Width="400" Height="300" CornerRadius="10" Padding="10">
            <ItemsControl ItemsSource="{Binding Screens}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Button caliburn:Message.Attach="Activate" caliburn:Action.Target="{Binding}" Content="{Binding DisplayName}" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </Border>
    </Grid>
</UserControl>
